package com.example.springboot.service;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Borrow;
import com.example.springboot.entity.Returnbook;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * Description:
 *
 * @Author 马钰涵
 * @Create 2023/8/10 16:29
 * @Version 1.0
 */
public interface IBorrowService {
    List<Borrow> list();

    PageInfo<Borrow> page(BaseRequest baseRequest);

    void save(Borrow borrow);
    PageInfo<Returnbook> pageReturnbook(BaseRequest baseRequest);

    void saveReturn(Returnbook returnbook);

    Borrow getById(Integer id);

    void update(Borrow borrow);

    void deleteById(Integer id);

    void deleteReturnById(Integer id);

    Map<String, Object> getCountByTimeRange(String timeRange);

    void deleteBatch(List<Integer> ids);

    void deleteReturnBatch(List<Integer> ids);
}
